package com.translate.web.api.controller;

import java.util.List;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.param.impl.IdPageParam;
import com.param.impl.IdParam;
import com.translate.vo.SecondaryServiceTypeVO;
import com.response.vo.ResponseModel;
import com.controller.base.AbstractCommonController;
import com.translate.web.constant.RedisConstant;
import com.translate.entity.SecondaryServiceType;
import com.translate.web.service.ISecondaryServiceTypeService;
import com.basic.service.contract.IBaseService;

@RestController
@RequestMapping("secondaryServiceType")
public class SecondaryServiceTypeController extends AbstractCommonController<SecondaryServiceType, IdPageParam> {
	private ISecondaryServiceTypeService service;


	public SecondaryServiceTypeController(ISecondaryServiceTypeService service) {
		this.service = service;
	}

	@Override
	protected IBaseService<SecondaryServiceType> getBaseService() {
		return this.service;
	}

	/**
	 * 添加
	 * 
	 * @param <V>
	 * @param param
	 * @return
	 */
	@PostMapping("/item")
	public ResponseModel<SecondaryServiceType> item(@RequestBody @Validated IdParam param) {
		
		return ResponseModel.<SecondaryServiceType>success(this.service.selectByPrimaryKey(param.getId()))
				;

	}

	protected <VO> Class<VO> getTarget() {
		return (Class<VO>) SecondaryServiceTypeVO.class;
	}
}